package lwk.function;

import java.util.function.Supplier;

/**
 * @author:lwk
 * @create: 2022-08-18 22:20
 * @Description: Supplier供给型接口:没有参数，只有返回值
 */
public class Demo04 {
    public static void main(String[] args) {

//        Supplier<String> supplier = new Supplier<>() {
//            @Override
//            public String get() {
//                return "supplier get";
//            }
//        };

        Supplier<String> supplier = () -> "supplier get";

        System.out.println(supplier.get());
    }
}
